/*
1:安装插件  vue-router   yarn add vue-router
2:导入插件  
3：路由方法的调用，会产生一个路由的实例对象
4：暴露实例对象
5：挂载到app
6:路由出口
*/

import { createRouter, createWebHashHistory } from 'vue-router'
export default createRouter({
  //   vue2  mode:'hash/history'   routes:[]
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      component: () => import('../views/home/index.vue')
    },
    {
      path: '/login',
      component: () => import('../views/login/index.vue')
    }
  ]
})
